package com.meteor.web.controller;

import com.meteor.util.BlogBean;
import com.meteor.service.BlogService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class WebTimeController {

    @Resource
    private BlogService blogService;

    /**
     * 跳转到时间页面
     */
    @GetMapping("/time")
    public String tags(Model model){
        List<BlogBean> blogs = blogService.queryBlog();
        model.addAttribute("blogs",blogs);
        return "time";
    }



}
